package com.spe.upms.api.feign.fallback;

import com.spe.common.core.util.R;
import com.spe.upms.api.dto.UserInfo;
import com.spe.upms.api.feign.RemoteUserService;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author limingliang
 * @date 2021/1/11 11:21
 */
@Slf4j
@Component
public class RemoteUserServiceFallbackImpl implements RemoteUserService {

    @Setter
    private Throwable cause;

    @Override
    public R<UserInfo> info(String username, String from) {
        log.error("feign 查询用户信息失败:{}", username, cause);
        return null;
    }

    @Override
    public R<UserInfo> social(String inStr) {
        log.error("feign 查询用户信息失败:{}", inStr, cause);
        return null;
    }

}
